Optimal. Leaf size=26 \[ -\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3745, 396, 213}
\begin {gather*} -\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 396
Rule 3745
Rubi steps
\begin {align*} \int \text {csch}(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a+b-b x^2}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=-\frac {b \text {sech}(c+d x)}{d}+\frac {a \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 52, normalized size = 2.00 \begin {gather*} -\frac {a \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a \log \left (\sinh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {b \text {sech}(c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.17, size = 27, normalized size = 1.04
method | result | size |
derivativedivides | \(\frac {-2 a \arctanh \left ({\mathrm e}^{d x +c}\right )-\frac {b}{\cosh \left (d x +c \right )}}{d}\) | \(27\) |
default | \(\frac {-2 a \arctanh \left ({\mathrm e}^{d x +c}\right )-\frac {b}{\cosh \left (d x +c \right )}}{d}\) | \(27\) |
risch | \(-\frac {2 b \,{\mathrm e}^{d x +c}}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )}+\frac {a \ln \left ({\mathrm e}^{d x +c}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{d x +c}+1\right )}{d}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 40, normalized size = 1.54 \begin {gather*} \frac {a \log \left (\tanh \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} - \frac {2 \, b}{d {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 167 vs.
\(2 (26) = 52\).
time = 0.33, size = 167, normalized size = 6.42 \begin {gather*} -\frac {2 \, b \cosh \left (d x + c\right ) + {\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) - {\left (a \cosh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a \sinh \left (d x + c\right )^{2} + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + 2 \, b \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{2} + 2 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + d \sinh \left (d x + c\right )^{2} + d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \operatorname {csch}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 68 vs.
\(2 (26) = 52\).
time = 0.43, size = 68, normalized size = 2.62 \begin {gather*} -\frac {a \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} + 2\right ) - a \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} - 2\right ) + \frac {4 \, b}{e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 64, normalized size = 2.46 \begin {gather*} -\frac {2\,\mathrm {atan}\left (\frac {a\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {-d^2}}{d\,\sqrt {a^2}}\right )\,\sqrt {a^2}}{\sqrt {-d^2}}-\frac {2\,b\,{\mathrm {e}}^{c+d\,x}}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________